package com.gzx.qc.modular.voice.check.mapper;

import com.gzx.qc.modular.voice.check.entity.GzxVoiceCheck;
import com.gzx.qc.modular.voice.check.entity.vo.GzxVoiceCheckVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import vip.xiaonuo.common.mapper.BaseMapperPlus;

import java.util.List;

/**
 * @author zjt
 * @description
 * @since 2025/2/5 16:07
 */
public interface GzxVoiceCheckMapper extends BaseMapperPlus<GzxVoiceCheck, GzxVoiceCheckVo> {

    /**
     * 批量新增质检主表
     *
     * @param voiceCheckList
     */
    @Insert("<script>" +
            "INSERT IGNORE INTO gzx_voice_check (call_id, liaison_phone, user_name, dept_id, file_url, create_time) VALUES " +
            "<foreach collection='voiceCheckList' item='item' separator=','>" +
            "(#{item.callId}, #{item.liaisonPhone}, #{item.userName}, #{item.deptId}, #{item.fileUrl}, #{item.createTime})" +
            "</foreach>" +
            "</script>")
    void batchInsertIgnore(@Param("voiceCheckList") List<GzxVoiceCheck> voiceCheckList);
}
